#pragma once

#include <QtCore/QtGlobal>
#include "GUIWidget/GUIWidgetBase.h"


namespace EventOper 
{
	class ParaWidgetInterfaceOperator;
}

namespace Ui 
{
	class GUICfgComputationSettingWidget;
}

namespace Interface 
{
	class FITKCDCfgCSetComputation;
	class FITKCDCfgCSetBase;
	class FITKCDCfgCSetPath;
}


namespace GUI
{
	class MainWindow;
	class GUIWIDGETAPI GUICfgComputationSettingWidget : public GUIWidgetBase
	{
		Q_OBJECT
	public:
		GUICfgComputationSettingWidget(EventOper::ParaWidgetInterfaceOperator* oper, QWidget* parent = nullptr);
		~GUICfgComputationSettingWidget();

		void init();

    private slots:
		void on_doubleSpinBox_Minimum_xyz0_valueChanged(double value);
		void on_doubleSpinBox_Minimum_xyz1_valueChanged(double value);
		void on_doubleSpinBox_Minimum_xyz2_valueChanged(double value);
		void on_doubleSpinBox_Maximum_xyz0_valueChanged(double value);
		void on_doubleSpinBox_Maximum_xyz1_valueChanged(double value);
		void on_doubleSpinBox_Maximum_xyz2_valueChanged(double value);

		void on_doubleSpinBox_Sound_Speed_valueChanged(double value);
		void on_doubleSpinBox_CFL_valueChanged(double value);
		void on_doubleSpinBox_Background_Pressure_valueChanged(double value);
		void on_doubleSpinBox_Initial_dx_valueChanged(double value);
		void on_doubleSpinBox_Simulation_Time_valueChanged(double value);
		void on_doubleSpinBox_Save_Time_Steps_valueChanged(double value);
		void on_doubleSpinBox_Monitor_Time_Steps_valueChanged(double value);
		void on_spinBox_Print_Steps_valueChanged(int value);
		void on_spinBox_Maximum_Particles_valueChanged(int value);
		void on_comboBox_Smoothed_Kernel_Function_activated(int index);
		void on_comboBox_Time_Integration_activated(int index);
		void on_comboBox_Output_File_Type_activated(int index);
		void on_checkBox_Bound_Output_stateChanged(int state);

		void on_lineEdit_Data_Storage_Path_editingFinished();
		void on_lineEdit_Data_Reading_Path_editingFinished();

		void on_spinBox_Compute_Force_valueChanged(int value);
		void on_checkBox_Compute_Rigid_Normalvector_stateChanged(int state);
		void on_checkBox_Delete_Particles_stateChanged(int state);
		void on_checkBox_Rigid_Output_stateChanged(int state);
		void on_lineEdit_Name_Of_STL_editingFinished();

    private:
		void setDataToWidget();

    private:
        EventOper::ParaWidgetInterfaceOperator* _oper = nullptr;
		Ui::GUICfgComputationSettingWidget* _ui = nullptr;

		Interface::FITKCDCfgCSetComputation* _pComputation;
		Interface::FITKCDCfgCSetBase* _pBase;
		Interface::FITKCDCfgCSetPath* _pPath;
	};
}